<template>
  <div >
    <component :is="currentView"></component>
  </div>
</template>

<script>
import indexOne from './indexOne.vue';
import indexTwo from './indexTwo.vue';

export default {
  data() {
    return {
      currentView: 'indexOne' // 初始视图为HomePage
    }
  },
  components: {
    indexOne,
    indexTwo,
  },
  mounted() {
    setInterval(() => {
      this.currentView = this.currentView === 'indexOne' ? 'indexTwo' : 'indexOne'; // 切换视图
    }, 10000); // 每10秒切换一次
  }
}
</script>
